


#ifndef _COUNTER_H_
#define _COUNTER_H_
#include "app.h"






#define CHANNEL1	0
#define CHANNEL2	1

#define DISABLE		0
#define ENABLE		1

#define REG_FREQUENCE_LOW_CH1		0x00
#define REG_FREQUENCE_HIGH_CH1		0x01
#define REG_HIHG_VOLTAGE_TIME_CH1	0x02
#define REG_CHANNEL_CH1				0x03

#define REG_FREQUENCE_LOW_CH2		0x04
#define REG_FREQUENCE_HIGH_CH2		0x05
#define REG_HIHG_VOLTAGE_TIME_CH2	0x06
#define REG_CHANNEL_CH2				0x07

#define REG_LED_SET					0x08
#define REG_VERSION					0x09


#define REG_LED						0x09


#define REG_PLUS					0x0a

#define FILE_SIZE					4096


#ifdef PRINT_OPEN 
#define PRINT_OPEN_COUNTER	1
#else
#define PRINT_OPEN_COUNTER	0
#endif



#define COUNTER_MAGIC 'C'
#define IOCTL_COUNTER_RESET		_IOW	(COUNTER_MAGIC, 1, int)


extern int CounterSet(struct Config *pConfig, unsigned char channel);
extern int CounterInit(void);

static int CounterVersion(struct Config *pConfig);

extern int CounterReset(void);
extern int CounterPulseRead(unsigned char *data);

extern int CounterLedTest(int flag);





#endif



